package xin.ctkqiang.config;

import xin.ctkqiang.dto.Database;

public class Configuration {
    private static String DatabaseMode = Database.MYSQL.getValue();

    public static final String DB_NAME = "ExploitDB";
    public static final String DB_URL = "jdbc:mysql://localhost:3306/" + DB_NAME
            + "?serverTimezone=UTC&allowPublicKeyRetrieval=true&useSSL=false";

    public static final String DB_SQLITE_URL = "jdbc:sqlite:ling.sqlite";

    public static final String DB_USER = "root";
    public static final String DB_PASSWORD = "";
    public static final String DB_DRIVER = "com.mysql.cj.jdbc.Driver";

    public static final boolean DEBUG = false;

    public static String getDatabaseMode() {
        return DatabaseMode;
    }

    public static void setDatabaseMode(Database databaseMode) {
        DatabaseMode = databaseMode.getValue();
        System.out.println(String.format("🎀 你当前选择的数据库模式是:「%s」～酱酱 ♪(๑˃ᴗ˂)ﻭ \n", getDatabaseMode()));
    }
}
